package com.dstz.crm.rest.controller;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import com.dstz.base.api.aop.annotion.CatchErr;
import com.dstz.base.api.exception.BusinessMessage;
import com.dstz.base.api.query.QueryFilter;
import com.dstz.base.api.response.impl.ResultMsg;
import com.dstz.base.core.util.StringUtil;
import com.dstz.base.db.model.page.PageResult;
import com.dstz.base.rest.BaseController;
import com.dstz.base.rest.GenericController;
import com.dstz.base.rest.util.RequestUtil;
import com.dstz.crm.core.manager.CustomerShareManager;
import com.github.pagehelper.Page;



/**
 * 案例 控制器类<br/>
 * @author  aschs
 * </pre>
 */
@RestController
@RequestMapping("/crm/customerShare")
public class CustomerShareController extends GenericController{
	@Resource
	CustomerShareManager customerShareManager;
	
	/**
     * 保存信息
     */
    @RequestMapping("save")
    @CatchErr("用户共享操作失败")
    public void save(HttpServletRequest request, HttpServletResponse response) throws Exception {
    	 String customerIds = RequestUtil.getString(request, "customerIds");
         String userIds = RequestUtil.getString(request, "userIds");
         
         customerShareManager.customerShare(customerIds, userIds);
         writeSuccessResult(response, " 用户共享成功");
    }
    
	
}
